<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>商品举报</title>
    <!-- layUI的核心CSS文件 -->
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/layui-v2.5.7/layui/css/layui.css"/>
    <!-- layUI的核心JS文件 -->
    <script src="${pageContext.request.contextPath}/static/layui-v2.5.7/layui/layui.js" type="text/javascript"
            charset="UTF-8"></script>
    <style>
        .detail div {
            margin-top: 10px;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <%-- 头部区域 --%>
    <div class="layui-header">
        <div class="layui-logo"><a style="color: #009688;">龙洞闲置购物系统</a></div>

        <!-- 头部区域（可配合layui已有的水平导航） -->

        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item">
                <a href="ShowALLGoods">首页</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">商品举报</a>

            </li>
            <script type="text/javascript">
                layui.use('form', function () {
                    let form = layui.form;
                    form.on('submit(search)', function (data) {
                        console.log(data);
                        return false;
                    });
                });
            </script>
        </ul>
        <%--</form>--%>
        <%@include file="../common/head.jsp" %>
    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px">
        <legend style="margin-left: 50px;">商品举报</legend>
    </fieldset>
    <%-- 主体部分 --%>
    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-col-md8 layui-col-lg-offset2"
                 style="margin-top: 50px;margin-left:0;border: 1px solid gray;height: 420px;width:950px;margin-bottom: 20px;">
                <%-- 商品图片、商品名、价格--%>
                <div class="layui-col-md5"
                     style="margin: 10px;height: 400px;text-align: center;">
                    <c:if test="${good.gimg_path==null}">
                        <img src="${pageContext.request.contextPath}/static/images/white1.jpg"
                             style="width: 80%;height: 80%;" alt="图片加载失败">
                    </c:if>
                    <c:if test="${good.gimg_path!=null}">
                        <img src="${good.gimg_path}"
                             style="max-width: 80%;max-height: 80%;" alt="图片加载失败">
                    </c:if>
                    <div class="layui-row" style="font-size: 25px;">
                        ${good.gname}<br>
                        <span style="font-size:30px;color: red;">
                                ￥${good.gprice}
                            </span>
                    </div>
                </div>
                <%-- 商品其他详细信息 --%>
                <div class="layui-col-md6" style="margin-top: 50px;width:500px;height: 150px;">
                    <%-- 商品类别 --%>
                    <div class="layui-row" style="font-size: 25px;color: rebeccapurple;">
                        <span style="font-size: 18px;color: gray;">商品类别：</span>${good.gcid}
                    </div>
                    <%-- 商品描述 --%>
                    <div class="layui-row" style="font-size: 25px;color: hotpink">
                        <span style="font-size: 18px;color: gray;">商品描述：</span>
                        <c:if test="${good.gdetail==''}">
                            （无）
                        </c:if>
                        <c:if test="${good.gdetail!=''}">
                            ${good.gdetail}
                        </c:if>
                    </div>
                    <%-- 上架时间 --%>
                    <div class="layui-row" style="font-size: 25px;color: rebeccapurple">
                        <span style="font-size: 18px;color: gray;">上架时间：</span>${good.gtime}
                    </div>
                    <%-- 卖家 --%>
                    <div class="layui-row" style="font-size: 25px;color: rebeccapurple">
                        <span style="font-size: 18px;color: gray;"> 卖家：</span>${good.guname}
                    </div>
                </div>
                <div class="layui-col-md5">
                    <form class="layui-form layui-form-pane" action="${pageContext.request.contextPath}/createTOGoods"
                          method="post">
                        <input type="hidden" name="tgid" value="${good.gid}"/>
                        <input type="hidden" name="tuid" value="${good.guid}"/>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">举报原因</label>
                            <div class="layui-input-block">
                        <textarea name="treason" lay-verify="required" placeholder="请描述该商品涉及的违规内容"
                                  class="layui-textarea" style="resize: none;"maxlength="150"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>
</div>

</body>
</html>
